/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */


let parseJson = <T = {}>(object: string): T => {
    let obj = {};
    try {
        obj = JSON.parse(object);
    } catch (e) {
        obj = {};
    }
    return obj as T;
};

export default parseJson;